import request from '@/utils/request'

export function getHotTenderType() {
  return request({
    url: '/getHotTenderType',
    method: 'get',
  })
}

export function getHotTenderProduct() {
  return request({
    url: '/getHotTenderProduct',
    method: 'get',
  })
}

export function getNewTenderProject() {
  return request({
    url: '/getNewTenderProject',
    method: 'get',
  })
}

export function upload(data) {
  return request({
    url: '/upload',
    method: 'post',
    data: data
  })
}

export function listImage(data) {
  return request({
    url: '/listImage',
    method: 'get',
    params: data
  })
}

export function addImage(data) {
  return request({
    url: '/addImage',
    method: 'post',
    data
  })
}

export function updateImage(data) {
  return request({
    url: '/updateImage',
    method: 'post',
    data
  })
}

export function deleteImageCarousel(data) {
  return request({
    url: '/deleteImageCarousel',
    method: 'delete',
    data
  })
}


export function getNewImageCarousel() {
  return request({
    url: '/getNewImageCarousel',
    method: 'get',
  })
}

// 获取公告
//add
export function addAnnouncement(data) {
  return request({
    url: '/addAnnouncement',
    method: 'post',
    data
  })
}

export function delAnnouncement(data) {
  return request({
    url: '/delAnnouncement',
    method: 'delete',
    data
  })
}
export function updateAnnouncement(data) {
  return request({
    url: '/updateAnnouncement',
    method: 'put',
    data
  })
}

export function listAnnouncement(data) {
  return request({
    url: '/listAnnouncement',
    method: 'get',
    params: data
  })
}

export function getAccountCanPublish() {
  return request({
    url: '/getAccountCanPublish',
    method: 'get',
  })
}


export function listTopAnnouncement(data) {
  return request({
    url: '/listTopAnnouncement',
    method: 'get',
    params: data
  })
}

export function getNoticeById(data) {
  return request({
    url: '/getAnnouncementById',
    method: 'get',
    params: data
  })
}


export function listUser(data) {
  return request({
    url: '/listUser',
    method: 'get',
    params: data
  })
}

export function getUserInfo(data) {
  return request({
    url: '/getUserInfo',
    method: 'get',
    params: data
  })
}

export function getDataCount() {
  return request({
    url: '/getDataCount',
    method: 'get',
  })
}

export function getNoticeCount() {
  return request({
    url: '/getNoticeCount',
    method: 'get',
  })
}